using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;

namespace WFTest.Entity
{
    public partial class Model11 : DbContext
    {
        public Model11()
            : base("name=Model11")
        {
        }

        public virtual DbSet<V_WW_CN_BILLPAYABLE> V_WW_CN_BILLPAYABLE { get; set; }
        public virtual DbSet<V_WW_CN_BILLRECEIVABLE> V_WW_CN_BILLRECEIVABLE { get; set; }
        public virtual DbSet<V_WW_CN_CustMag> V_WW_CN_CustMag { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<V_WW_CN_BILLPAYABLE>()
                .Property(e => e.FPARAMOUNTFOR)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_WW_CN_BILLPAYABLE>()
                .Property(e => e.FUNPAYAMOUTFOR)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_WW_CN_BILLPAYABLE>()
                .Property(e => e.FSETTLESTATUS)
                .IsUnicode(false);

            modelBuilder.Entity<V_WW_CN_BILLRECEIVABLE>()
                .Property(e => e.FPARAMOUNTFOR)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_WW_CN_BILLRECEIVABLE>()
                .Property(e => e.FSETTLESTATUS)
                .IsUnicode(false);

            modelBuilder.Entity<V_WW_CN_CustMag>()
                .Property(e => e.F_VIVH_DiscountRate_w5c)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_WW_CN_CustMag>()
                .Property(e => e.F_VIVH_Amount_k79)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_WW_CN_CustMag>()
                .Property(e => e.F_VIVH_Amount_43c)
                .HasPrecision(23, 10);

            modelBuilder.Entity<V_WW_CN_CustMag>()
                .Property(e => e.F_VIVH_Amount_h1g)
                .HasPrecision(23, 10);
        }
    }
}
